/*
 * This file is part of b.AMP.
 *
 * b.AMP is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * b.AMP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with b.AMP.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __BAMP_CONTROL_CONFIG_HPP__
#define __BAMP_CONTROL_CONFIG_HPP__

#include <boost/filesystem.hpp>

#include <set>
#include <string>

namespace bamp
{

    /**
     * The ControlConfig structure contains the configuration keys of
     * the control subsystem. It is loaded and saved using Boost's
     * Property Tree library.
     */
    struct ControlConfig
    {
        ControlConfig() { reset(); }

        // Filesystem load/save
        void load(const boost::filesystem::path& file);
        void save(const boost::filesystem::path& file);
        
        // Set default values
        void reset();

        // Replace environment variables with their actual value
        static std::string replaceEnvVar(const std::string& str);

        // Values from the config file
        boost::filesystem::path logfile;
        std::set<boost::filesystem::path> addons;
        std::set<boost::filesystem::path> path;
    };
};

#endif // __BAMP_CONTROL_CONFIG_HPP__
